import { createPage } from '../../common/weapp-page'
import { mpCompToWidget } from '../../common/widget'
import { concatClassList, px2rpx } from '../../common/style'
import { app } from '../../app/weapps-api'
import { $page } from './api'
import { index as handlers } from '../../app/handlers'
import lifecyle from '../../lowcode/index/lifecycle'
import state from '../../lowcode/index/state'
import computed from '../../lowcode/index/computed'


const widgetProps = {
  id1: {
    style: {
      display: 'flex',
      justifyContent: 'center',
      alignItems: 'center',
      flexDirection: 'row'
    },
    classList: [],
    _parentId: undefined,
    _order: 0,
    widgetType: 'gsd-h5-react:Container'
  },
  id2: {
    style: { width: '90%', marginTop: '30rpx' },
    classList: [],
    _parentId: 'id1',
    _order: 0,
    widgetType: 'gsd-h5-react:Container'
  },
  id3: {
    style: { width: '70%' },
    classList: [],
    appParameter: '',
    categoryId: [],
    content: '按钮',
    disabled: false,
    formType: 'button',
    loading: false,
    openType: '',
    sendMessageImg: '',
    sendMessagePath: '',
    sendMessageTitle: '',
    sessionFrom: '',
    showMessageCard: false,
    size: 'default',
    type: 'primary',
    _parentId: 'id2',
    _order: 0,
    widgetType: 'CLOUDBASE_STANDARD:Button'
  }
}
/** widget event listeners **/
const evtListeners = {
}
const dataBinds = {
}

$page.id = 'index'
$page.uuid = 'index'
$page.handler = handlers
createPage(lifecyle, widgetProps, state, computed, evtListeners, dataBinds, app, $page)
